<template>
  <BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="500" @ok="handleSubmit">

    <a-form ref="formEl" :model="planModel" :label-col="{xs: {span: 24}, sm: {span: 6}}" :wrapper-col="{xs: {span: 24}, sm: {span: 18}}" >
      <a-row>
        <a-col :span="22">
          <a-form-item label="起始编号" name="begin" :span="22">
            <a-input style="width: 100%"  v-model:value="planModel.begin"></a-input>
          </a-form-item>
        </a-col>
      </a-row>

      <a-row>
        <a-col :span="22">
          <a-form-item label="结束编号" name="end" :span="22">
            <a-input style="width: 100%"   v-model:value="planModel.end"></a-input>
          </a-form-item>
        </a-col>
      </a-row>
    </a-form>

  </BasicModal>
</template>

<script lang="ts" setup>
import {BasicModal, useModalInner} from '/@/components/Modal';
import {ref, computed, unref, reactive,defineProps } from 'vue';
import {batchAdd} from "/@/views/assets/receipt/DbReceipt.api";

const title = "连续编号单据入库";
const planModel = reactive({ });
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {

});

async function handleSubmit(v) {
  console.log(planModel)
  let params = {begin:planModel.begin,end:planModel.end};
  batchAdd(params);
}


</script>
